﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using InstantNaukriDAL;
using System.Security.Cryptography;
using System.Text;

public partial class JobSeekerLogin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        try
        {
            lblMsg.Text = "";
            clsUserLoginDAL objclsUserLoginDAL = new clsUserLoginDAL();
            IN_TB_USER objIN_TB_USER = new IN_TB_USER();
            objIN_TB_USER = objclsUserLoginDAL.GetUserByUserNamePassword(txtUserName.Text, txtPassword.Text);
            if (objIN_TB_USER != null)
            {
                if (objIN_TB_USER.ROLEID == 4)
                {
                    Session["UserId"] = objIN_TB_USER.ID.ToString();
                    string roleid = clsEncryptionDecryption.Encrypt("4");
                    // Response.Redirect("JobseekerProfile.aspx?roleid=" + roleid);
                    Response.Redirect("JobseekerPrieview.aspx?roleid=" + roleid);

                }
            }
            else
                lblMsg.Text = "Invalid UserName or Password !";
        }
        catch (Exception)
        {

            throw;
        }
    }
}
